//logs.js
const util = require('../../utils/util.js')
Page({
  data: {
    lists: ""
  },
  onLoad: function () {
    var that = this;
    var session3rd = wx.getStorageSync("session3rd");
    wx.request({
      url: "https://myzhongchou.net/public/index.php/api/order/order_list",
      data: {
        session3rd: session3rd
      },
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        that.setData({
          lists: res.data.msg
        })
      }
    })
  },
  dateil: function (e) {
    var ids = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: '../orddateil/orddateil?id=' + ids
    })
  },
  onShow: function () {
    var that = this;
    var session3rd = wx.getStorageSync("session3rd");
    wx.request({
      url: "https://myzhongchou.net/public/index.php/api/order/order_list",
      data: {
        session3rd: session3rd
      },
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        if (res.data.success == 0) {
          that.setData({
            lists: res.data.msg
          })
        }
      }
    })
  }
})
